/**
 * Project of Vehicle Routing Problem with Time Windows implements 
 * some of well-known algorithms for solving VRPTW and presents new 
 * one.
 *
 * @author Michal Drobny  
 */

package logic.restriction.capacity;

import logic.restriction.Restriction;
import logic.restriction.interfaces.HasCapacity;

/**
 * Represents the restriction for capacity. Capacity can be represented by
 * various types. The current type is represented by generic type T. All
 * restriction are stored in object RestrictionAdapter.
 * 
 * @author Michal Drobny
 * @date 25.11.2014
 */
public abstract class CapacityRestriction<T extends Comparable<T>> extends Restriction implements HasCapacity<T> {

	protected T capacity;
	
	/**
	 * @param capacity
	 */
	public CapacityRestriction(T capacity) {
		super();
		this.capacity = capacity;
	}

	@Override
	public T getCapacity() {
		return capacity;
	}
}